package com.sushengren.easyword.model;

import com.sushengren.easyword.anchor.Anchor;
import lombok.Getter;
import lombok.Setter;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
import org.apache.poi.xwpf.usermodel.XWPFRun;
import org.w3c.dom.Node;

import java.util.List;

/**
 * 锚点定位上下文
 *
 * @author sushengren
 */
@Getter
@Setter
public class AnchorContext {

    /**
     * 定位 Key
     */
    private String key;

    /**
     * 文档
     */
    private XWPFDocument document;

    /**
     * 段落
     */
    private XWPFParagraph paragraph;

    /**
     * 文本
     */
    private List<XWPFRun> runs;

    /**
     * 节点列表
     */
    private List<Node> nodeList;

    /**
     * 锚点定位类
     */
    private Anchor anchor;

    /**
     * 子锚点
     */
    private AnchorContext children;

    /**
     * 相同Key情况下的排序
     */
    private int keyIndex;

}
